*******************************************************************************
******************************REPLICATION FILE 2******************************
*****Kam, Cindy D. and John Sides. 
*****Body Politic: Disgust, Partisanship, and Public Opinion on Viral Outbreaks
*****Journal of Politics
*****This file recreates all figures and tables in the appendix
*******************************************************************************

log using "2025-09-01 Replication file 2.txt", replace text

**#
*******************************************************************************TABLE A1. Independent Variable Coding*************
use Body_Politic_All_datasets, clear 

forval j =1(1)5 {
	gen wave_`j'=0
	replace wave_`j' = 1 if dataset==`j'
}

svyset [iweight=weight]
forval j =1(1)5 {
svy, subpop(wave_`j'): mean disgust pid7catdR ideol female black hisp othrace age01
matrix m_`j' = e(b)
matrix subpop_`j' = e(_N)
estat sd
matrix sd_`j'=r(sd)
}

forval j =1(1)5 {
matrix stats_`j'=(m_`j')',(sd_`j')'
matlist stats_`j', format(%4.3f) line(columns)
}

matrix allstats = stats_1, stats_2, stats_3, stats_4, stats_5
matlist allstats , format(%4.2f) line(columns)

matrix B = subpop_1\subpop_2\subpop_3\subpop_4\subpop_5 
matrix rownames B = CCES16 Nationscape1 Nationscape2 CCES20 YouGov22
matlist B
matrix subN = B[1..5,1]'
matrix rowname subN = subpop_N
matlist subN

**#
*******************************************************************************TABLE A2. Dependent Variable Indices*************
use Body_Politic_All_datasets, clear 

*Concern about coronavirus
forval j=1/3 {
	alpha concern_US_`j' concern_live_`j'
	factor concern_US_`j' concern_live_`j'
}

*Personal behaviors
alpha per_wash per_cancel_travel per_stock_goods per_novisit per_stayhome per_nohospital per_avoid_public per_work_home 
factor per_wash per_cancel_travel per_stock_goods per_novisit per_stayhome per_nohospital per_avoid_public per_work_home 

alpha avoided_socwdist avoided_socwodist avoided_travel
factor avoided_socwdist avoided_socwodist avoided_travel

*Reluctance to return to activities
alpha return_restaurant_1 return_sports_1 return_child_school_1 return_concert_1 return_fly_1 return_mall_1 return_transit_1 return_movies_1 return_dinner_1 return_dentist_1 return_haircut_1 return_funeral_1 return_wedding_1 return_church_1 return_school_self_1 

factor return_restaurant_1 return_sports_1 return_child_school_1 return_concert_1 return_fly_1 return_mall_1 return_transit_1 return_movies_1 return_dinner_1 return_dentist_1 return_haircut_1 return_funeral_1 return_wedding_1 return_church_1 return_school_self_1 

alpha disc_restaurant disc_takeout disc_grocerystore disc_grocerydelivery disc_friendsover disc_bar
factor disc_restaurant disc_takeout disc_grocerystore disc_grocerydelivery disc_friendsover disc_bar

alpha return_restaurant_3 return_sports_3 return_concert_3 return_fly_3 return_mall_3 return_transit_3 return_movies_3 return_dinner_3 return_dentist_3 return_haircut_3 return_church_3 

factor return_restaurant_3 return_sports_3 return_concert_3 return_fly_3 return_mall_3 return_transit_3 return_movies_3 return_dinner_3 return_dentist_3 return_haircut_3 return_church_3 

alpha loc_cancel_meet_1 loc_close_biz_1 loc_close_schools_1 loc_work_home_1 loc_restrict_noness_1 loc_fevertest_1

factor loc_cancel_meet_1 loc_close_biz_1 loc_close_schools_1 loc_work_home_1 loc_restrict_noness_1 loc_fevertest_1

alpha loc_cancel_meet_2 loc_close_biz_2 loc_close_schools_2 loc_work_home_2 loc_restrict_noness_2 loc_fevertest_2 loc_req_mask_2 loc_quar_high_2 

factor loc_cancel_meet_2 loc_close_biz_2 loc_close_schools_2 loc_work_home_2 loc_restrict_noness_2 loc_fevertest_2 loc_req_mask_2 loc_quar_high_2 

alpha K12masks K12vax masks_plane health_vax biz_vax
factor K12masks K12vax masks_plane health_vax biz_vax

**#
*******************************************************************************APPENDIX B. Model Results for Figures in the Article*************
*****Appendix Table B1*****
*DVs aligned with Ebola & Zika Analysis
svyset [pweight=weight]
foreach var in ebola_concern zika_concern concern_live_1 concern_live_2 concern_live_3 ebola_US zika_US protectAmer_1 protectAmer_2 protectAmer_3 ebola_AF zika_LA fightabroad_1 fightabroad_2 fightabroad_3 ebola_UScit zika_UScit prevent_UScit_1 prevent_UScit_2 prevent_UScit_3 ebola_forcit zika_forcit prevent_forcit_1 prevent_forcit_2 prevent_forcit_3 {
quietly svy: reg `var' disgust pid7catdR ideol female black hisp othrace age01 
est store `var'
}

estout ebola_concern zika_concern concern_live_1 concern_live_2 concern_live_3 ///
using AppTableB1.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout ebola_US zika_US protectAmer_1 protectAmer_2 protectAmer_3 ///
using AppTableB1.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout ebola_AF zika_LA fightabroad_1 fightabroad_2 fightabroad_3 ///
using AppTableB1.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout ebola_UScit zika_UScit prevent_UScit_1 prevent_UScit_2 prevent_UScit_3 ///
using AppTableB1.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout ebola_forcit zika_forcit prevent_forcit_1 prevent_forcit_2 prevent_forcit_3 ///
using AppTableB1.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

*****Appendix Table B2*****
*Personal Behaviors 
foreach var of varlist per_wash per_cancel_travel per_stock_goods per_novisit per_stayhome per_nohospital per_avoid_public per_work_home have_wornmask avoided_socwdist avoided_socwodist avoided_travel have_wornmask3 have_vaccinated have_booster index_pers_1 index_pers_2r {
 quietly svy: reg `var' disgust pid7catdR ideol female black hisp othrace age01 
est store `var'
}

estout per_wash per_cancel_travel per_stock_goods per_novisit per_stayhome per_nohospital per_avoid_public per_work_home index_pers_1 ///
using AppTableB2.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout have_wornmask avoided_socwdist avoided_socwodist avoided_travel index_pers_2r have_wornmask3 have_vaccinated have_booster  ///
using AppTableB2.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

*****Appendix Table B3*****
*Reluctance to Return 
foreach var of varlist return_restaurant_1 return_sports_1 return_child_school_1 return_concert_1 return_fly_1 return_mall_1 return_transit_1 return_movies_1 return_dinner_1 return_dentist_1 return_haircut_1 return_funeral_1 return_wedding_1 return_church_1 return_school_self_1 disc_restaurant disc_takeout disc_grocerystore disc_grocerydelivery disc_friendsover disc_bar return_restaurant_3 return_sports_3 return_concert_3  return_fly_3 return_mall_3 return_transit_3 return_movies_3 return_dinner_3 return_dentist_3 return_haircut_3 return_church_3 index_return_1  index_discomfort index_return_3{
quietly svy: reg `var' disgust pid7catdR ideol female black hisp othrace age01 
est store `var'
}

estout return_restaurant_1 return_sports_1 return_child_school_1 return_concert_1 return_fly_1 return_mall_1 return_transit_1 return_movies_1 ///
using AppTableB3.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout return_dinner_1 return_dentist_1 return_haircut_1 return_funeral_1 return_wedding_1 return_church_1 return_school_self_1 index_return_1 /// 
using AppTableB3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout return_restaurant_3 return_sports_3 return_concert_3  return_fly_3 return_mall_3 return_transit_3 return_movies_3 return_dinner_3 ///
using AppTableB3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout return_dentist_3 return_haircut_3 return_church_3 index_return_3 ///
using AppTableB3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout disc_bar disc_restaurant disc_friendsover disc_grocerydelivery disc_takeout disc_grocerystore index_discomfort ///
using AppTableB3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

*****Appendix Table B4*****
foreach var of varlist loc_cancel_meet_1 loc_close_biz_1 loc_close_schools_1 loc_work_home_1 loc_restrict_noness_1 loc_fevertest_1 loc_cancel_meet_2 loc_close_biz_2 loc_close_schools_2 loc_work_home_2 loc_restrict_noness_2 loc_fevertest_2 loc_req_mask_2 loc_quar_high_2 K12masks K12vax masks_plane health_vax biz_vax index_pol_1 index_pol_2 index_pol_3  {
quietly svy: reg `var' disgust pid7catdR ideol female black hisp othrace age01 
est store `var'
}

estout loc_cancel_meet_1 loc_close_biz_1 loc_close_schools_1 loc_work_home_1 loc_restrict_noness_1 loc_fevertest_1 index_pol_1 ///
using AppTableB4.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout loc_cancel_meet_2 loc_close_biz_2 loc_close_schools_2 loc_work_home_2 loc_restrict_noness_2 loc_fevertest_2 loc_req_mask_2 loc_quar_high_2  index_pol_2 /// 
using AppTableB4.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout K12masks K12vax masks_plane health_vax biz_vax index_pol_3 /// 
using AppTableB4.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

*****Appendix Table B5*****
gen disgustpid7catdR = disgust*pid7catdR
lab var disgustpid7catdR "DisgustxPID"
svyset [pweight=weight]
foreach var in ebola_concern zika_concern concern_live_1 concern_live_2 concern_live_3 ebola_US zika_US protectAmer_1 protectAmer_2 protectAmer_3 ebola_AF zika_LA fightabroad_1 fightabroad_2 fightabroad_3 ebola_UScit zika_UScit prevent_UScit_1 prevent_UScit_2 prevent_UScit_3 ebola_forcit zika_forcit prevent_forcit_1 prevent_forcit_2 prevent_forcit_3 index_concern_1 index_concern_2 index_concern_3 {
quietly svy: reg `var' disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01 
est store `var'
}

estout ebola_concern zika_concern concern_live_1 concern_live_2 concern_live_3 ///
using AppTableB5.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout ebola_US zika_US protectAmer_1 protectAmer_2 protectAmer_3 ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout ebola_AF zika_LA fightabroad_1 fightabroad_2 fightabroad_3 ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout ebola_UScit zika_UScit prevent_UScit_1 prevent_UScit_2 prevent_UScit_3 ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout ebola_forcit zika_forcit prevent_forcit_1 prevent_forcit_2 prevent_forcit_3 ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout index_concern_1 index_concern_2 index_concern_3 ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

*Personal Behaviors 
foreach var of varlist per_wash per_cancel_travel per_stock_goods per_novisit per_stayhome per_nohospital per_avoid_public per_work_home have_wornmask avoided_socwdist avoided_socwodist avoided_travel have_wornmask3 have_vaccinated have_booster index_pers_1 index_pers_2r {
quietly svy: reg `var' disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01 
est store `var'
}

estout per_wash per_cancel_travel per_stock_goods per_novisit per_stayhome per_nohospital per_avoid_public per_work_home index_pers_1 ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout have_wornmask avoided_socwdist avoided_socwodist avoided_travel index_pers_2r have_wornmask3 have_vaccinated have_booster  ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

*Reluctance to Return 
foreach var of varlist return_restaurant_1 return_sports_1 return_child_school_1 return_concert_1 return_fly_1 return_mall_1 return_transit_1 return_movies_1 return_dinner_1 return_dentist_1 return_haircut_1 return_funeral_1 return_wedding_1 return_church_1 return_school_self_1 disc_restaurant disc_takeout disc_grocerystore disc_grocerydelivery disc_friendsover disc_bar return_restaurant_3 return_sports_3 return_concert_3  return_fly_3 return_mall_3 return_transit_3 return_movies_3 return_dinner_3 return_dentist_3 return_haircut_3 return_church_3 index_return_1  index_discomfort index_return_3{
 quietly svy: reg `var' disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01 
est store `var'
}

estout return_restaurant_1 return_sports_1 return_child_school_1 return_concert_1 return_fly_1 return_mall_1 return_transit_1 return_movies_1 ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout return_dinner_1 return_dentist_1 return_haircut_1 return_funeral_1 return_wedding_1 return_church_1 return_school_self_1 index_return_1 /// 
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout return_restaurant_3 return_sports_3 return_concert_3  return_fly_3 return_mall_3 return_transit_3 return_movies_3 return_dinner_3 ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout return_dentist_3 return_haircut_3 return_church_3 index_return_3 ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout disc_bar disc_restaurant disc_friendsover disc_grocerydelivery disc_takeout disc_grocerystore index_discomfort ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)


*Policy Opinions
foreach var of varlist loc_cancel_meet_1 loc_close_biz_1 loc_close_schools_1 loc_work_home_1 loc_restrict_noness_1 loc_fevertest_1 loc_cancel_meet_2 loc_close_biz_2 loc_close_schools_2 loc_work_home_2 loc_restrict_noness_2 loc_fevertest_2 loc_req_mask_2 loc_quar_high_2 K12masks K12vax masks_plane health_vax biz_vax index_pol_1 index_pol_2 index_pol_3  {
 quietly svy: reg `var' disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01 
est store `var'
}

estout loc_cancel_meet_1 loc_close_biz_1 loc_close_schools_1 loc_work_home_1 loc_restrict_noness_1 loc_fevertest_1 index_pol_1 ///
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout loc_cancel_meet_2 loc_close_biz_2 loc_close_schools_2 loc_work_home_2 loc_restrict_noness_2 loc_fevertest_2 loc_req_mask_2 loc_quar_high_2  index_pol_2 /// 
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

estout K12masks K12vax masks_plane health_vax biz_vax index_pol_3 /// 
using AppTableB5.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01)

est clear
**#
*******************************************************************************APPENDIX C. Effect Sizes*************
use Body_Politic_All_datasets, clear 
*Bivariate Correlations
tempname memhold
tempfile corrsbyDV
postfile `memhold' str30 DV r_disgust N using "corrsbyDV_disgust", replace 
foreach v in ebola_concern zika_concern concern_live_1 concern_live_2 concern_live_3 ebola_US zika_US protectAmer_1 protectAmer_2 protectAmer_3 ebola_AF zika_LA fightabroad_1 fightabroad_2 fightabroad_3 ebola_UScit zika_UScit prevent_UScit_1 prevent_UScit_2 prevent_UScit_3 ebola_forcit zika_forcit prevent_forcit_1 prevent_forcit_2 prevent_forcit_3 per_wash per_cancel_travel per_stock_goods per_novisit per_stayhome per_nohospital per_avoid_public per_work_home have_wornmask avoided_socwdist avoided_socwodist avoided_travel have_wornmask3 have_vaccinated have_booster index_pers_1 index_pers_2r return_restaurant_1 return_sports_1 return_child_school_1 return_concert_1 return_fly_1 return_mall_1 return_transit_1 return_movies_1 return_dinner_1 return_dentist_1 return_haircut_1 return_funeral_1 return_wedding_1 return_church_1 return_school_self_1 disc_restaurant disc_takeout disc_grocerystore disc_grocerydelivery disc_friendsover disc_bar return_restaurant_3 return_sports_3 return_concert_3  return_fly_3 return_mall_3 return_transit_3 return_movies_3 return_dinner_3 return_dentist_3 return_haircut_3 return_church_3 index_return_1  index_discomfort index_return_3 loc_cancel_meet_1 loc_close_biz_1 loc_close_schools_1 loc_work_home_1 loc_restrict_noness_1 loc_fevertest_1 loc_cancel_meet_2 loc_close_biz_2 loc_close_schools_2 loc_work_home_2 loc_restrict_noness_2 loc_fevertest_2 loc_req_mask_2 loc_quar_high_2 K12masks K12vax masks_plane health_vax biz_vax index_pol_1 index_pol_2 index_pol_3 {
corr disgust `v'
post `memhold' ("`v'") (r(rho)) (r(N))
}
postclose `memhold'

tempname memhold
tempfile corrsbyDV
postfile `memhold' str30 DV r_pid7catdR N using "corrsbyDV_pid", replace 
foreach v in ebola_concern zika_concern concern_live_1 concern_live_2 concern_live_3 ebola_US zika_US protectAmer_1 protectAmer_2 protectAmer_3 ebola_AF zika_LA fightabroad_1 fightabroad_2 fightabroad_3 ebola_UScit zika_UScit prevent_UScit_1 prevent_UScit_2 prevent_UScit_3 ebola_forcit zika_forcit prevent_forcit_1 prevent_forcit_2 prevent_forcit_3 per_wash per_cancel_travel per_stock_goods per_novisit per_stayhome per_nohospital per_avoid_public per_work_home have_wornmask avoided_socwdist avoided_socwodist avoided_travel have_wornmask3 have_vaccinated have_booster index_pers_1 index_pers_2r  return_restaurant_1 return_sports_1 return_child_school_1 return_concert_1 return_fly_1 return_mall_1 return_transit_1 return_movies_1 return_dinner_1 return_dentist_1 return_haircut_1 return_funeral_1 return_wedding_1 return_church_1 return_school_self_1 disc_restaurant disc_takeout disc_grocerystore disc_grocerydelivery disc_friendsover disc_bar return_restaurant_3 return_sports_3 return_concert_3  return_fly_3 return_mall_3 return_transit_3 return_movies_3 return_dinner_3 return_dentist_3 return_haircut_3 return_church_3 index_return_1  index_discomfort index_return_3 loc_cancel_meet_1 loc_close_biz_1 loc_close_schools_1 loc_work_home_1 loc_restrict_noness_1 loc_fevertest_1 loc_cancel_meet_2 loc_close_biz_2 loc_close_schools_2 loc_work_home_2 loc_restrict_noness_2 loc_fevertest_2 loc_req_mask_2 loc_quar_high_2 K12masks K12vax masks_plane health_vax biz_vax index_pol_1 index_pol_2 index_pol_3 {
corr pid7catdR `v'
post `memhold' ("`v'") (r(rho)) (r(N))
}
postclose `memhold'

preserve 
use corrsbyDV_disgust, clear 
merge 1:1 DV using CorrsbyDV_pid, gen(merge) update

*Per Gignac and Szodorai, focus on abs value
gen abs_r_pid7 = abs(r_pid7)
gen abs_r_disgust = abs(r_disgust)

histogram abs_r_disgust, title("|Correlations| for Disgust & DVs") name(disgustcorr, replace) xtitle("Disgust") 

histogram abs_r_pid7, title("|Correlations| for PID & DVs") name(pidcorr, replace) xtitle("PID")

graph combine disgustcorr pidcorr, ycommon xcommon row(2)

summarize abs_r_disgust abs_r_pid7, det 

//from wide to long
gen eachDV = _n
reshape long abs_r_, i(eachDV) j(corr_) string
sort corr_ 

gen sortorder = .
replace sortorder = 1 if corr_ =="disgust"
replace sortorder = 2 if corr_ =="pid7"
lab def sortorder 1 "Disgust" 2"Party"
lab val sortorder sortorder 

graph box abs_r_, over(sortorder, sort(1)) ytitle("|Correlations|") title("|Correlations|: Outcome Variables, Party, and Disgust") name(box_abs, replace)

restore 

*Standardized independent variables, comparisons across coefficients
use Body_Politic_All_datasets, clear 
forval j =1(1)5 {
	gen wave_`j'=0
	replace wave_`j' = 1 if dataset==`j'
}

//create big variable that will house data for each wave
foreach v of varlist disgust pid7catdR ideol female black hisp othrace age01 {
	gen Z`v' = . 
	}

svyset [iweight=weight]
foreach v of varlist disgust pid7catdR ideol female black hisp othrace age01 {
forval j =1(1)5 {
	svy, subpop(wave_`j'): mean `v'
	estat sd
	matrix `v'_`j'mean = r(mean)
	svmat `v'_`j'mean, name(`v'_`j'mean)
	matrix `v'_`j'sd= r(sd)
	svmat `v'_`j'sd, name(`v'_`j'sd)
	egen `v'_`j'mean_all = mean(`v'_`j'mean)
	egen `v'_`j'sd_all = mean(`v'_`j'sd)
	gen z`v'_`j' = (`v'-`v'_`j'mean_all)/(`v'_`j'sd_all)
	replace Z`v'=z`v'_`j' if wave_`j'==1
	} 
}

tempname memhold
postfile `memhold' str30 DV bZdisgust bZpid7catdR bZideol bZfemale bZblack bZhisp bZothrace bZage01 seZdisgust seZpid7catd seZideol seZfemale seZblack seZhisp seZothrace seZage01 N using "All_Zcoeffs", replace 
foreach var in ebola_concern zika_concern concern_live_1 concern_live_2 concern_live_3 ebola_US zika_US protectAmer_1 protectAmer_2 protectAmer_3 ebola_AF zika_LA fightabroad_1 fightabroad_2 fightabroad_3 ebola_UScit zika_UScit prevent_UScit_1 prevent_UScit_2 prevent_UScit_3 ebola_forcit zika_forcit prevent_forcit_1 prevent_forcit_2 prevent_forcit_3 per_wash per_cancel_travel per_stock_goods per_novisit per_stayhome per_nohospital per_avoid_public per_work_home have_wornmask avoided_socwdist avoided_socwodist avoided_travel have_wornmask3 have_vaccinated have_booster index_pers_1 index_pers_2r  return_restaurant_1 return_sports_1 return_child_school_1 return_concert_1 return_fly_1 return_mall_1 return_transit_1 return_movies_1 return_dinner_1 return_dentist_1 return_haircut_1 return_funeral_1 return_wedding_1 return_church_1 return_school_self_1 disc_restaurant disc_takeout disc_grocerystore disc_grocerydelivery disc_friendsover disc_bar return_restaurant_3 return_sports_3 return_concert_3  return_fly_3 return_mall_3 return_transit_3 return_movies_3 return_dinner_3 return_dentist_3 return_haircut_3 return_church_3 index_return_1  index_discomfort index_return_3 loc_cancel_meet_1 loc_close_biz_1 loc_close_schools_1 loc_work_home_1 loc_restrict_noness_1 loc_fevertest_1 loc_cancel_meet_2 loc_close_biz_2 loc_close_schools_2 loc_work_home_2 loc_restrict_noness_2 loc_fevertest_2 loc_req_mask_2 loc_quar_high_2 K12masks K12vax masks_plane health_vax biz_vax index_pol_1 index_pol_2 index_pol_3 {
quietly svy: reg `var' Zdisgust Zpid7catd Zideol Zfemale Zblack Zhisp Zothrace Zage01 
post `memhold' ("`var'") (_b[Zdisgust]) (_b[Zpid7catdR]) (_b[Zideol]) (_b[Zfemale]) (_b[Zblack]) (_b[Zhisp]) (_b[Zothrace]) (_b[Zage01]) (_se[Zdisgust]) (_se[Zpid7catdR]) (_se[Zideol]) (_se[Zfemale]) (_se[Zblack]) (_se[Zhisp]) (_se[Zothrace]) (_se[Zage01]) (e(N))
}
postclose `memhold'

preserve 
use All_Zcoeffs, clear
keep DV bZ* N
gen eachDV = _n
renpfix bZ bZ_
reshape long bZ_, i(eachDV) j(b_) string
sort b_ 
egen coef = group(b_) 

replace bZ_ = -bZ if b_=="ideol"

gen sortorder = .
replace sortorder = 1 if b_=="disgust"
replace sortorder = 2 if b_=="pid7catdR"
replace sortorder = 3 if b_=="age01"
replace sortorder = 4 if b_=="ideol"
replace sortorder = 5 if b_=="female"
replace sortorder = 6 if b_=="hisp"
replace sortorder = 7 if b_=="othrace"
replace sortorder = 8 if b_=="black"

lab def sortorder 1 "Disgust" 2"Party" 3"Age" 4"Ideology" 5"Female" 6"Hispanic" 7"Other race" 8"Black", modify
lab val sortorder sortorder

graph box bZ_, over(sortorder, sort(1) descending) yline(0, lcolor(red)) title("Summary of Coefficients") name(boxcoef, replace) ytitle("OLS Coefficients") 

twoway dot bZ_ sortorder, xlabel(#8, valuelabel) xtitle("") ytitle("OLS Coefficients") title("All Coefficients") name(dotcoef, replace ) yline(0, lcolor(red))

graph combine dotcoef boxcoef, row(2) name(Zcoeffs, replace)

*color coded datasets
recode N (0/1000=1 "CCES 2016")(1401/1599=3 "CES 2020")(1001/1400 1600/2000=4 "YouGov 2022")(4000/11000=2 "Lucid Apr+Jul 2020"), gen(dataset)

twoway (scatter bZ_ sortorder if dataset==1, jitter(5) mcolor(black*.5) msymbol(oh)) (scatter bZ_ sortorder if dataset==2, jitter(5) mcolor(green*.5) msymbol(dh))(scatter bZ_ sortorder if dataset==3, jitter(5) mcolor(red*.5) msymbol(th))(scatter bZ_ sortorder if dataset==4, jitter(5) mcolor(purple*.5) msymbol(sh)) , xlabel(#8, valuelabel) xtitle("") ytitle("OLS Coefficients") title("All Coefficients") name(dotcoef_color, replace ) yline(0, lcolor(red)) legend(lab(1 "2016 CCES") lab(2 "2020 Lucid") lab(3 "2020 CES") lab(4 "2022 YouGov") row(1)) 
restore 


*Effect sizes across disgust x pid analyses
use Body_Politic_All_datasets, clear 
gen disgustpid7catdR = disgust*pid7catdR
svyset [pweight=weight]
tempname memhold
postfile `memhold' str30 DV bdisgustpid7catdR bdisgust bpid7catdR bideol bfemale bblack bhisp bothrace bage01 sedisgustpid7catdR sedisgust sepid7catdR seideol sefemale seblack sehisp seothrace seage01 N using "intxn_allDVs", replace 
foreach var in ebola_concern zika_concern concern_live_1 concern_live_2 concern_live_3 ebola_US zika_US protectAmer_1 protectAmer_2 protectAmer_3 ebola_AF zika_LA fightabroad_1 fightabroad_2 fightabroad_3 ebola_UScit zika_UScit prevent_UScit_1 prevent_UScit_2 prevent_UScit_3 ebola_forcit zika_forcit prevent_forcit_1 prevent_forcit_2 prevent_forcit_3 per_wash per_cancel_travel per_stock_goods per_novisit per_stayhome per_nohospital per_avoid_public per_work_home have_wornmask avoided_socwdist avoided_socwodist avoided_travel have_wornmask3 have_vaccinated have_booster index_pers_1 index_pers_2r  return_restaurant_1 return_sports_1 return_child_school_1 return_concert_1 return_fly_1 return_mall_1 return_transit_1 return_movies_1 return_dinner_1 return_dentist_1 return_haircut_1 return_funeral_1 return_wedding_1 return_church_1 return_school_self_1 disc_restaurant disc_takeout disc_grocerystore disc_grocerydelivery disc_friendsover disc_bar return_restaurant_3 return_sports_3 return_concert_3  return_fly_3 return_mall_3 return_transit_3 return_movies_3 return_dinner_3 return_dentist_3 return_haircut_3 return_church_3 index_return_1  index_discomfort index_return_3 loc_cancel_meet_1 loc_close_biz_1 loc_close_schools_1 loc_work_home_1 loc_restrict_noness_1 loc_fevertest_1 loc_cancel_meet_2 loc_close_biz_2 loc_close_schools_2 loc_work_home_2 loc_restrict_noness_2 loc_fevertest_2 loc_req_mask_2 loc_quar_high_2 K12masks K12vax masks_plane health_vax biz_vax index_pol_1 index_pol_2 index_pol_3 {
quietly svy: reg `var' disgustpid7catdR disgust pid7catdR ideol female black hisp othrace age01 
est store `var'
post `memhold' ("`var'") (_b[disgustpid7catdR]) (_b[disgust]) (_b[pid7catdR]) (_b[ideol]) (_b[female]) (_b[black]) (_b[hisp]) (_b[othrace]) (_b[age01]) (_se[disgustpid7catdR]) (_se[disgust]) (_se[pid7catdR]) (_se[ideol]) (_se[female]) (_se[black]) (_se[hisp]) (_se[othrace]) (_se[age01]) (e(N))
}
postclose `memhold'

use intxn_allDVs, clear
append using AppC_intxn_published

recode N (0/1000=1 "CCES 2016")(1401/1599=3 "CES 2020")(1001/1400 1600/2000=4 "YouGov 2022")(4000/11000=2 "Lucid Apr+Jul 2020"), gen(wave)
replace wave = 9 if Study~=""
lab def wave 9"Published work", modify

recode wave (1/4=1 "Our study")(9=0 "benchmarks"), gen(ourstudy)
recode wave (1=0)(2 3 4=1)(else=.), gen(covidDVs)

recode N (0/1000=1 "<1000")(1001/3000=2 "1000-3000")(3001/5000 =3 "3001-5000")(5001/11000=4 "5001+"), gen(sizesurvey)

gen indexDV = 1 if strpos(DV,"index")
replace indexDV = 0 if indexDV~=1 
replace indexDV =. if ourstudy==0

gen tdisgustpid7 = abs(bdisgustpid7/sedisgustpid7)
gen pdisgustpid7 = ttail(N-10,tdisgustpid7)*2

recode pdisgustpid7 (0/.05=1 "sig")(.051/1=0 "ns"), gen(sigat05)

*Significance for COVID DVs 
bysort covidDVs: tab sigat05 indexDV, col
bysort wave: sum bdisgustpid7, det

gen lb = bdisgustpid7 - invttail(N-10,.025)*sedisgustpid7
gen ub = bdisgustpid7 + invttail(N-10,.025)*sedisgustpid7
set scheme s1mono

recode bdisgustpid7 (-2/0=1 "negative sign")(0/2=0 "positive sign")(else=.), gen(negativesign)

tab negativesign sigat05 if ourstudy==1, col
tab DV if sigat05==1 & ourstudy==1

sort bdisgustpid7 
gen graphorder = _n
twoway (scatter bdisgustpid7 graphorder if wave==1, mcolor(black*.5) msymbol(oh))(scatter bdisgustpid7 graphorder if wave==2, mcolor(green*.5) msymbol(dh)) (scatter bdisgustpid7 graphorder if wave==3, mcolor(red*.5) msymbol(th))(scatter bdisgustpid7 graphorder if wave==4, mcolor(purple*.5) msymbol(sh))(scatter bdisgustpid7 graphorder if wave==9, mcolor(black) msymbol(s)) (rcap lb ub graphorder if wave==1, lcolor(black*.5)) (rcap lb ub graphorder if wave==2, lcolor(green*.5))(rcap lb ub graphorder if wave==3, lcolor(red*.5))(rcap lb ub graphorder if wave==4, lcolor(purple*.5))(rcap lb ub graphorder if wave==9, lcolor(black)) , yline(0) xtitle(" ") xlabel(none) title("Disgust Interacted" "With PID (Our Studies) or Ideology (Benchmarks)" "Coefficients and 95% CI") legend(order(1 2 3 4 5) lab(1 "2016 CCES") lab(2 "2020 Lucid") lab(3 "2020 CES") lab(4 "2022 YouGov") lab(5 "Published Work") row(1) span) name(disgustxpid, replace)

gen absbdisgustpid7 = abs(bdisgustpid7)
gen abslb = absbdisgustpid7 - invttail(N-10,.025)*sedisgustpid7
gen absub = absbdisgustpid7 + invttail(N-10,.025)*sedisgustpid7
 
sort absbdisgustpid7 
gen absgraphorder = _n
twoway (scatter absbdisgustpid7 absgraphorder if wave==1, mcolor(black*.5) msymbol(oh))(scatter absbdisgustpid7 absgraphorder  if wave==2, mcolor(green*.5) msymbol(dh)) (scatter absbdisgustpid7 absgraphorder  if wave==3, mcolor(red*.5) msymbol(th))(scatter absbdisgustpid7 absgraphorder  if wave==4, mcolor(purple*.5) msymbol(sh))(scatter absbdisgustpid7 absgraphorder  if wave==9, mcolor(black) msymbol(s)) (rcap abslb absub absgraphorder  if wave==1, lcolor(black*.5)) (rcap abslb absub absgraphorder  if wave==2, lcolor(green*.5))(rcap abslb absub absgraphorder  if wave==3, lcolor(red*.5))(rcap abslb absub absgraphorder  if wave==4, lcolor(purple*.5))(rcap abslb absub  absgraphorder  if wave==9, lcolor(black)) , yline(0) xtitle(" ") xlabel(none) title("Disgust Interacted" "With PID (Our Studies) or Ideology (Benchmarks)" "|Coefficients| and 95% CI") legend(order(1 2 3 4 5) lab(1 "2016 CCES") lab(2 "2020 Lucid") lab(3 "2020 CES") lab(4 "2022 YouGov") lab(5 "Published Work") row(1) span)

recode absgraphorder (30/106=1)(else=0), gen(publishedinterval)
tab publishedinterval ourstudy 
tab publishedinterval ourstudy if sigat05==1, col
tab publishedinterval wave if sigat05==1, col
tab sigat05 wave

**# 
*******************************************************************************APPENDIX D. Multiple Comparisons*************
*See separate .do file
**# 
*******************************************************************************APPENDIX E. Auxiliary Analyses*************
*****Appendix Table E1*****
use Body_Politic_All_datasets, clear

foreach var of varlist fedcovid covid_spending covid_priority return_veryfew eff_schools eff_outdoor eff_indoor eff_gatherings eff_disinfect eff_vax confidence_adults confidence_kids12 confidence_kids5 confidence_toddler confidence_pregnant {
quietly svy: reg `var' disgust pid7catdR ideol female black hisp othrace age01 
est store `var'
}

estout fedcovid covid_spending covid_priority return_veryfew ///
using AppTableE1.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout eff_schools eff_outdoor eff_indoor eff_gatherings eff_disinfect eff_vax ///
using AppTableE1.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

estout confidence_adults confidence_kids12 confidence_kids5 confidence_toddler confidence_pregnant ///
using AppTableE1.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust pid7catdR ideol female black hisp othrace age01)

**# 
*******************************************************************************APPENDIX F. Measures of Disgust*************
*****Appendix Figure F1*****
**********Histograms of disgust sensitivity with weighted data
use Body_Politic_All_datasets, clear

svyset [iweight=weight]
forval j =1(1)5 {
	gen wave_`j'=0
	replace wave_`j' = 1 if dataset==`j'
	svy, subpop(wave_`j'): mean disgust 
}
gen fweight = (weight*10000)
replace fweight = round(fweight)
histogram disgust [freq=fweight] if dataset==1, percent bin(15) title("2016 CCES") name(disgust_wave1, replace) caption("N=834")
histogram disgust [freq=fweight] if dataset==2, percent bin(15) title("April 2020 Nationscape") name(disgust_wave2, replace) caption("N=9704")
histogram disgust [freq=fweight] if dataset==3, percent bin(15) title("July 2020 Nationscape") name(disgust_wave3, replace) caption("N=9380")
histogram disgust [freq=fweight] if dataset==4, percent bin(15) title("Fall 2020 CCES") name(disgust_wave4, replace) caption("N=1500")
histogram disgust [freq=fweight] if dataset==4, percent bin(15) title("June 2022 Yougov") name(disgust_wave5, replace) caption("N=2000")

graph combine disgust_wave1 disgust_wave2 disgust_wave3 disgust_wave4 disgust_wave5, name(AppFigureF1, replace) row(2) ycommon xcommon
graph export AppFigureF1.jpg, replace

*****Analyses*****
use Body_Politic_All_datasets, clear 
svyset [pweight=weight]
foreach var in concern_live_1 protectAmer_1 fightabroad_1 prevent_UScit_1 prevent_forcit_1 per_wash per_cancel_travel per_stock_goods per_novisit per_stayhome per_nohospital per_avoid_public per_work_home index_pers_1 return_restaurant_1 return_sports_1 return_child_school_1 return_concert_1 return_fly_1 return_mall_1 return_transit_1 return_movies_1 return_dinner_1 return_dentist_1 return_haircut_1 return_funeral_1 return_wedding_1 return_church_1 return_school_self_1 index_return_1 loc_cancel_meet_1 loc_close_biz_1 loc_close_schools_1 loc_work_home_1 loc_restrict_noness_1 loc_fevertest_1 index_pol_1 {
quietly svy: reg `var' disgust2item pid7catdR ideol female black hisp othrace age01 
est store `var'_2
}

*****Appendix Table F1*****
estout concern_live_1_2 protectAmer_1_2 fightabroad_1_2 prevent_UScit_1_2 prevent_forcit_1_2 ///
using AppTableF1.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item pid7catdR ideol female black hisp othrace age01)

*****Appendix Table F2*****
estout per_wash_2 per_cancel_travel_2 per_stock_goods_2 per_novisit_2 per_stayhome_2 per_nohospital_2 per_avoid_public_2 per_work_home_2 index_pers_1_2 using AppTableF2.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item pid7catdR ideol female black hisp othrace age01)

*****Appendix Table F3*****
estout return_restaurant_1_2 return_sports_1_2 return_child_school_1_2 return_concert_1_2 return_fly_1_2 return_mall_1_2 return_transit_1_2 return_movies_1_2 ///
using AppTableF3.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item pid7catdR ideol female black hisp othrace age01)

estout return_dinner_1_2 return_dentist_1_2 return_haircut_1_2 return_funeral_1_2 return_wedding_1_2 return_church_1_2 return_school_self_1_2 index_return_1_2 ///
using AppTableF3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item pid7catdR ideol female black hisp othrace age01)

*****Appendix Table F4*****
estout loc_cancel_meet_1_2 loc_close_biz_1_2 loc_close_schools_1_2 loc_work_home_1_2 loc_restrict_noness_1_2 loc_fevertest_1_2 index_pol_1_2 ///
using AppTableF4.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item pid7catdR ideol female black hisp othrace age01)
est clear 

foreach var in concern_live_2 protectAmer_2 fightabroad_2 prevent_UScit_2 prevent_forcit_2 concern_live_3 protectAmer_3 fightabroad_3 prevent_UScit_3 prevent_forcit_3 have_wornmask avoided_socwdist avoided_socwodist avoided_travel index_pers_2r have_wornmask3 have_vaccinated have_booster return_restaurant_3 return_sports_3 return_concert_3  return_fly_3 return_mall_3 return_transit_3 return_movies_3 return_dinner_3 return_dentist_3 return_haircut_3 return_church_3  index_return_3 disc_restaurant disc_takeout disc_grocerystore disc_grocerydelivery disc_friendsover disc_bar index_discomfort loc_cancel_meet_2 loc_close_biz_2 loc_close_schools_2 loc_work_home_2 loc_restrict_noness_2 loc_fevertest_2 loc_req_mask_2 loc_quar_high_2 index_pol_2 K12masks K12vax masks_plane health_vax biz_vax index_pol_3 {
quietly svy: reg `var' disgust2item pid7catdR ideol female black hisp othrace age01 
est store `var'_2
quietly svy: reg `var' disgust6item pid7catdR ideol female black hisp othrace age01 
est store `var'_6
quietly svy: reg `var' disgust8item pid7catdR ideol female black hisp othrace age01 
est store `var'_8
}

estout concern_live_2_2 concern_live_2_6 concern_live_2_8 protectAmer_2_2 protectAmer_2_6 protectAmer_2_8 fightabroad_2_2 fightabroad_2_6 fightabroad_2_8 ///
using AppTableF1.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout prevent_UScit_2_2 prevent_UScit_2_6 prevent_UScit_2_8 prevent_forcit_2_2 prevent_forcit_2_6 prevent_forcit_2_8 ///
using AppTableF1.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout concern_live_3_2 concern_live_3_6 concern_live_3_8 protectAmer_3_2 protectAmer_3_6 protectAmer_3_8 fightabroad_3_2 fightabroad_3_6 fightabroad_3_8 ///
using AppTableF1.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout prevent_UScit_3_2 prevent_UScit_3_6 prevent_UScit_3_8 prevent_forcit_3_2 prevent_forcit_3_6 prevent_forcit_3_8 ///
using AppTableF1.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout have_wornmask_2 have_wornmask_6 have_wornmask_8 avoided_socwdist_2 avoided_socwdist_6 avoided_socwdist_8 avoided_socwodist_2 avoided_socwodist_6 avoided_socwodist_8 ///
using AppTableF2.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout avoided_travel_2 avoided_travel_6 avoided_travel_8 index_pers_2r_2 index_pers_2r_6 index_pers_2r_8 ///
using AppTableF2.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout have_wornmask3_2 have_wornmask3_6 have_wornmask3_8 have_vaccinated_2 have_vaccinated_6 have_vaccinated_8 have_booster_2 have_booster_6 have_booster_8 ///
using AppTableF2.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|") order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout return_restaurant_3_2 return_restaurant_3_6 return_restaurant_3_8 return_sports_3_2 return_sports_3_6 return_sports_3_8 return_concert_3_2  return_concert_3_6  return_concert_3_8 ///
using AppTableF3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout return_fly_3_2 return_fly_3_6 return_fly_3_8 return_mall_3_2  return_mall_3_6 return_mall_3_8 return_transit_3_2 return_transit_3_6 return_transit_3_8 ///
using AppTableF3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout return_movies_3_2 return_movies_3_6 return_movies_3_8 return_dinner_3_2 return_dinner_3_6 return_dinner_3_8 return_dentist_3_2 return_dentist_3_6 return_dentist_3_8 ///
using AppTableF3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout return_haircut_3_2 return_haircut_3_6 return_haircut_3_8 return_church_3_2  return_church_3_6  return_church_3_8  index_return_3_2 index_return_3_6 index_return_3_8 	///
using AppTableF3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout disc_bar_2 disc_bar_6 disc_bar_8 disc_restaurant_2 disc_restaurant_6 disc_restaurant_8 disc_friendsover_2 disc_friendsover_6 disc_friendsover_8 /// 
using AppTableF3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout disc_grocerydelivery_2 disc_grocerydelivery_6 disc_grocerydelivery_8 disc_takeout_2 disc_takeout_6 disc_takeout_8 disc_grocerystore_2 disc_grocerystore_6 disc_grocerystore_8 ///
using AppTableF3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout index_discomfort_2 index_discomfort_6 index_discomfort_8 ///
using AppTableF3.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout loc_cancel_meet_2_2 loc_cancel_meet_2_6 loc_cancel_meet_2_8 loc_close_biz_2_2 loc_close_biz_2_6 loc_close_biz_2_8 loc_close_schools_2_2 loc_close_schools_2_6 loc_close_schools_2_8 ///
using AppTableF4.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout loc_work_home_2_2 loc_work_home_2_6 loc_work_home_2_8 loc_restrict_noness_2_2 loc_restrict_noness_2_6 loc_restrict_noness_2_8 loc_fevertest_2_2 loc_fevertest_2_6 loc_fevertest_2_8 ///
using AppTableF4.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout loc_req_mask_2_2 loc_req_mask_2_6 loc_req_mask_2_8 loc_quar_high_2_2 loc_quar_high_2_6 loc_quar_high_2_8 index_pol_2_2 index_pol_2_6 index_pol_2_8 ///
using AppTableF4.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout K12masks_2 K12masks_6 K12masks_8 K12vax_2 K12vax_6 K12vax_8 masks_plane_2 masks_plane_6 masks_plane_8 ///
using AppTableF4.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

estout health_vax_2 health_vax_6 health_vax_8 biz_vax_2 biz_vax_6 biz_vax_8 index_pol_3_2 index_pol_3_6 index_pol_3_8  ///
using AppTableF4.txt, append cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust2item disgust6item disgust8item pid7catdR ideol female black hisp othrace age01)

est clear 

**# 
*******************************************************************************APPENDIX G. Alternative Individual-Level Covariates*************
*****Appendix Table G1*****
use Body_Politic_All_datasets, clear 
foreach var of varlist index_concern_3 index_return_3 have_wornmask3 have_vaccinated index_pol_3 {
quietly svy: reg `var' disgust pid7catdR ideol female black hisp othrace age01 ed6cat famincd refinc humanit risk extraversion-openness sexism 
est store `var'_add
gen sample2022`var' =1 if e(sample)
quietly svy, subpop(sample2022`var'): reg `var' disgust pid7catdR ideol female black hisp othrace age01 
est store `var'
}

estout index_concern_3 index_concern_3_add index_return_3 index_return_3_add have_wornmask3 have_wornmask3_add have_vaccinated have_vaccinated_add index_pol_3 index_pol_3_add ///
using AppTableG1.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")order(disgust pid7catdR ideol female black hisp othrace age01 ed6cat famincd refinc humanit risk extraversion agreeable conscientious stable openness sexism )

est clear 

**# 
*******************************************************************************APPENDIX H. Local COVID-19 cases*************
use "Body_Politic_datasets_with_infections_data.dta", clear
* Table H1


local n=1
local ivs "disgust pid7catdR ideol female black hisp othrace age01 loglastmonth_casespc"
foreach dv of varlist index_concern_1 index_pers_1 index_pol_1 {
  quietly: reg `dv' `ivs' [iw=weight] if dataset==2, cluster(fips)
  est store m`n'
  local n=`n'+1 
}
foreach dv of varlist index_concern_2 index_pers_2r index_pol_2 {
  quietly: reg `dv' `ivs' [iw=weight] if dataset==3, cluster(fips)
  est store m`n'
  local n=`n'+1 
}
foreach dv of varlist index_concern_3 index_pol_3 have_vaccinated {
  quietly: reg `dv' `ivs' [iw=weight] if dataset==5, cluster(fips)
  est store m`n'
  local n=`n'+1 
}
estout m1 m2 m3 m4 m5 m6 m7 m8 m9 ///
using "AppTableH1.txt", replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")

* Analyses for Tables H2 & H3
foreach v of varlist index_concern_1 index_pers_1 index_pol_1 index_concern_2 index_pers_2r index_return_1 index_pol_2 index_concern_3 have_wornmask3 {
quietly: reg `v' loglastmonth_casespc disgust pid7catdR ideol female black hisp othrace age01  [iw=weight], cluster(fips)
est store `v'
quietly: reg `v' c.loglastmonth_casespc##c.disgust pid7catdR ideol female black hisp othrace age01  [iw=weight], cluster(fips)
est store `v'_xdis
quietly reg `v' c.loglastmonth_casespc##c.pid7catdR disgust ideol female black hisp othrace age01  [iw=weight], cluster(fips)
est store `v'_xpid
	}

* Table H1 (cases x disgust models)
estout index_concern_1 index_pers_1 index_pol_1 index_concern_2 index_pers_2r index_return_1 index_pol_2 index_concern_3 have_wornmask3 ///
using "AppTableH1.txt", replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")

* Table H2 (cases x disgust models)
estout index_concern_1_xdis index_pers_1_xdis index_pol_1_xdis index_concern_2_xdis index_pers_2r_xdis index_return_1_xdis index_pol_2_xdis index_concern_3_xdis have_wornmask3_xdis ///
using "AppTableH2.txt", replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")


* Table H3 (cases x PID models)
estout index_concern_1_xpid index_pers_1_xpid index_pol_1_xpid index_concern_2_xpid index_pers_2r_xpid index_return_1_xpid index_pol_2_xpid index_concern_3_xpid have_wornmask3_xpid ///
using "AppTableH3.txt", replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")


**# 
*******************************************************************************APPENDIX J. Ebola Questions in 2014 CES*************
*****Appendix Table J1*****
use CCES14_YAL_OUTPUT_Aug2015_vm.dta, clear
gen disgust1=YAL422_e/5
gen disgust2=YAL421_k/5
gen disgustscale=(disgust1+disgust2)/2
recode YAL432 1=1 2=.67 3=.33 4=0 *=., gen(quarantine)
recode pid7 8=4
gen pid7catd=(pid7-1)/6 
gen pid7catdR = -1*(pid7catd-1)
recode gender (1=0)(2=1)(else=.), gen(female)
recode race (1 3=0)(2=1)(4/8=0)(else=.), gen(black)
recode race (1 2=0)(3=1)(4/8=0)(else=.), gen(hisp)
recode race (1/3=0) (4/8=1)(else=.), gen(othrace)
gen age=2014-birthyr
gen age01 = (2014-birthyr-18)/(91-18)
recode educ (1=0)(2=.2)(3=.4)(4=.6)(5=.8)(6=1)(else=.), gen(ed6cat)
recode CC334A (1=0 "Very Lib")(2=.17)(3=.33)(4 8=.5)(5=.67)(6=.83)(7=1 "Very Con")(else=.), gen(ideol)
reg quarantine disgustscale pid7catd ideol female black hisp othrace age01 [iw=weight]
est store m1
estout m1 ///
using AppTableJ1.txt, replace cells(b(star fmt(2)) se(par(`"("' `")"')))  stats(N, fmt(%9.0g)) ///
label varlabels(_cons Constant) mlabels(,depvars) starl(* 0.05) delimiter("|")

*****tidying up directory*****
foreach v in corrsbyDV_disgust corrsbyDV_pid All_Zcoeffs intxn_allDVs {
	erase `v'.dta
}
*****tidying up directory*****

log close
